home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor1 / faq.doc < prev    next >
Text File  |  1995-03-31  |  48KB  |  1,097 lines

  1.                  HP-48SX Questions, Answers, & Useful Tidbits 
  2.  
  3.  
  4.      This list contains information which has not necessarily been verified, 
  5. and is not guaranteed to be correct, or even reflecting reality.  It was 
  6. compiled from various postings in comp.sys.handhelds, as well as other 
  7. sources.  Also note that, while the maintainer is an employee of 
  8. Hewlett-Packard, this list is not officially sanctioned by Hewlett-Packard 
  9. (the maintainer is doing this on his own time, and has absolutely no 
  10. connections with the HP division that makes calculators). 
  11.  
  12. Please send any comments or suggestions to: 
  13.  
  14.         Darryl Okahata 
  15.         Internet: darrylo%hpnmd@relay.hp.com 
  16.         CompuServe: 75206,3074 
  17.  
  18. Summary of questions: 
  19.  
  20.  1* I'm a novice, and I have some questions.  Where should I start? 
  21.  2* How can I tell what ROM revision I have? 
  22.  3* What bugs exist in the various versions of the HP-48SX? 
  23.  4* What is \->ASC or ASC\->? 
  24.  5* How can I get \->ASC and \->ASC? 
  25.  6* Why does my HP-48SX occasionally "freeze" for a moment? 
  26.  7* Why does (1/3)*3 equal 0.999999999999? 
  27.  8* I want `pi' to be a numeric value, not a symbol.  What's happening? 
  28.  9* If I add two temperatures like 34 deg.F and 11 deg.F, I get 504.67 deg.F. 
  29.     Why don't I get 45 deg.F? 
  30. 10* Why do I get corrupted binary files with kermit? 
  31. 11* My RAM card was plugged into the calculator when I changed the RAM card 
  32.     battery, yet I lost all the information on the card.  What happened? 
  33. 12* Why do I get an "Invalid card data" error when I merge a RAM card? 
  34. 13* My HP-48SX seems to take longer to turn on and off.  What's going on? 
  35. 14* I can't account for some of the RAM in the HP-48SX (I can't tell where 
  36.     it's being used).  What's going on? 
  37. 15* How do I get rid of the HYDE library? 
  38. 16* How can I transfer programs/data from my HP-28S to my HP-48SX? 
  39. 17* I could speed up my HP-28S.  How can I speed up my HP-48SX? 
  40. 18* Why does the HP-48SX display flicker slightly? 
  41. 19* I've heard that other manufacturer's RAM cards will work with the HP-48SX. 
  42.     Is this true?  Will it work? 
  43. 20* What library ID numbers have already been used? 
  44. 21* What do the funny symbols \->, \GS+, etc., mean? 
  45. 22* What tricks are there for manipulating matrices? 
  46. 23* How do I store fields of variable length string data in a compact, rapidly 
  47.     accessible manner that does not require the overhead of storing strings in 
  48.     lists? 
  49. 24* What is "Vectored Enter", and how do I use it? 
  50. 25* How can I tell, from within a program, if the battery is low? 
  51. 26* I've heard the names "RPL", "Saturn", "STAR", "Voyager", etc..  What do 
  52.     they mean? 
  53. 27* Appendix A: ASC\-> and \->ASC functions: 
  54. 28* Appendix B: Using non-HP RAM cards in your HP-48SX: 
  55. 29* Appendix C: Compact Data Storage: 
  56. 30* Appendix D: Various useful functions 
  57.  
  58.  
  59.  
  60. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  61.  
  62.  1* I'm a novice, and I have some questions.  Where should I start? 
  63.  
  64.   Start by perusing the HP-48SX manuals. 
  65.  
  66.   Also, look over the section "Answers to Common Questions", in Appendix A 
  67. (Volume II) of the manual. 
  68.  
  69. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  70.  
  71.  2* How can I tell what ROM revision I have? 
  72.  
  73.   Do the following: 
  74.  
  75.   1. Turn the calculator on (press ON and then release). 
  76.  
  77.   2.  Press ON again, and while holding it down, hit the "D" key (the fourth 
  78.      white key in the top row) and then release the ON key.  You should get 
  79.      three vertical lines in the display, one down the middle.   
  80.  
  81.   3.  Hit the backspace key (it says DROP and CLR over it).  You should get 
  82.      some meaningless hexadecimal in the first line of the display.  (Mine says 
  83.      705D9:1B8D...). 
  84.  
  85.   4. Press and hold down the EVAL key.  It should say: 
  86.  
  87.         Version HP48-* 
  88.         Copyright HP 1989 
  89.  
  90.      where the * is an uppercase letter (A, B, etc.) indicating 
  91.      the ROM version. 
  92.  
  93.   5. Release the EVAL key.  Hold down ON and hit "C" (the third white key in 
  94.      the top row.  This is a general reset operation that returns the 
  95.      calculator to normal from the diagnostic stuff (which is where ON-D puts 
  96.      you). 
  97.  
  98.   (The above was mostly taken from a posting by Mark Adler -- 
  99.   madler@tybalt.caltech.edu) 
  100.  
  101. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  102.  
  103.  3* What bugs exist in the various versions of the HP-48SX? 
  104.  
  105.    Version(s)   Bug 
  106.   ---------------------------------------------------------------------- 
  107.       A         DEFINE rounds numbers in user-defined functions if STD 
  108.                 is not the current display mode. 
  109.  
  110.       A         KGET on a zero length file from another machine will 
  111.                 cause the calculator memory to be cleared. 
  112.  
  113.       A         NXEQ from the Graphics Environment with flag -3 set (SYM 
  114.                 off in Modes) can overwrite the current equation with a 
  115.                 number. 
  116.  
  117.       A         Displaying the clock in 24-hour format causes the 
  118.                 one-digits for minutes to be incorrect in the alarm 
  119.                 catalog. 
  120.  
  121.     A,B,C       INV returns an incorrect result if used on an 8x8 or 
  122.                 larger matrix.  To get around this problem, divide the 
  123.                 identity matrix with the matrix to invert. 
  124.  
  125.    A,B,C,D      Entering a symbolic complex number in polar form like 
  126.                 '(A,<B)' (where < is really the funny little angle 
  127.                 symbol), gives an expression in A and B that is wrong 
  128.                 (the A and B are interchanged so A is the angle and B is 
  129.                 the magnitude). 
  130.  
  131.    A,B,C,D      If the clock is displayed during an ARCHIVE via RS-232, 
  132.                 there is a chance (not 100%) that calculator memory will 
  133.                 be cleared, after the transfer.  The workaround is to 
  134.                 turn the clock display off before doing the transfer. 
  135.  
  136.    A,B,C,D      TRNC and RND allow for an array in level 2 and a 
  137.                 symbolic in level 1 of the stack. This allows you to put 
  138.                 an array in a symbolic.  Example: 
  139.  
  140.                                 [ 2 3 ] 
  141.                                 '7/8' 
  142.                                 RND 
  143.                  
  144.                 returns 'RND(UNKNOWN,7/8)' 
  145.  
  146.   (The above was mostly copied from postings by Mark Adler 
  147.   (madler@tybalt.caltech.edu) or Jurjen NE Bos (jurjen@cwi.nl).) 
  148.  
  149. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  150.  
  151.  4* What is \->ASC or ASC\->? 
  152.  
  153.   These functions were written by William Wickes to facilitate transferring 
  154.   HP-48SX binary objects in an ASCII format (useful when transferring objects 
  155.   via electronic mail).  Some HP-48SX objects, like libraries, cannot normally 
  156.   be converted into ASCII, unlike program objects, and these functions make it 
  157.   possible to do so. 
  158.  
  159.   The \->ASC function converts the object in level 1 into an ASCII string, 
  160.   which can then be uploaded to a computer for mailing. 
  161.  
  162.   The ASC\-> function converts the string object in level 1 back into an 
  163.   object.  A checksum is used to insure that the decoding is correct. 
  164.  
  165. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  166.  
  167.  5* How can I get \->ASC and \->ASC? 
  168.  
  169.   A copy of these programs are given in Appendix A, near the end of this 
  170.   file. 
  171.  
  172. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  173.  
  174.  6* Why does my HP-48SX occasionally "freeze" for a moment? 
  175.  
  176.   The HP-48SX must occasionally do "garbage collection" to free up unused 
  177.   memory, and it is this garbage collection that is causing the momentary 
  178.   "freeze".  "Garbage collection" is where the HP-48SX scans through memory, 
  179.   looking for objects that are no longer used.   
  180.  
  181.   Using less stack supposedly makes garbage collection go faster. 
  182.  
  183. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  184.  
  185.  7* Why does (1/3)*3 equal 0.999999999999? 
  186.  
  187.   This is due to the way numbers are typically represented by computers and 
  188.   calculators.  There are some numbers, like `1/3' and `pi', that cannot be 
  189.   exactly represented internally.  As a result, any calculations that use these 
  190.   numbers are bound to be off.   
  191.  
  192. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  193.  
  194.  8* I want `pi' to be a numeric value, not a symbol.  What's happening? 
  195.  
  196.   You are using "Symbolic Results Mode".  To turn this mode on or off, go to 
  197.   the MODES menu (press orange/left-shift MODES), and press the "SYM" softkey. 
  198.  
  199. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  200.  
  201.  9* If I add two temperatures like 34 deg.F and 11 deg.F, I get 504.67 deg.F. 
  202.   Why don't I get 45 deg.F? 
  203.  
  204.   If the units attached to the number consists only of a temperature and 
  205.   nothing else, operations are done using an absolute temperature scale 
  206.   (relative to absolute zero).  If the units consists of a temperature and 
  207.   something else, such as degrees/minute, the operation will not be done using 
  208.   an absolute temperature scale. 
  209.  
  210.   It also does not make any physical sense to add two temperatures.  You can't 
  211.   add a cup of water at 20 degrees C to a cup of water at 30 degrees C and end 
  212.   up with two cups of water at 50 degrees C. 
  213.  
  214. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  215.  
  216. 10* Why do I get corrupted binary files with kermit? 
  217.  
  218.   Some versions of kermit distinguish between ASCII and binary files, and so 
  219.   you have to worry about the transfer modes at *BOTH* ends of the connection 
  220.   (the HP-48SX end and the computer end).  For example, when receiving ASCII 
  221.   files, Unix kermit must translate CR/LF pairs into LF.  If the HP-48SX is 
  222.   transmitting a binary file, but the Unix kermit is expecting ASCII, any CR/LF 
  223.   pairs in the binary file will get translated to LF, corrupting the binary 
  224.   file.  Unfortunately, you cannot "uncorrupt" the corrupted binary file by 
  225.   simply reversing the transfer and expecting kermit to translate LF to CR/LF. 
  226.   This is because the binary file may contain occurrences of LF that were not 
  227.   originally part of a CR/LF sequence.   
  228.  
  229.   Kermit running on IBM PC clones do not have to translate any incoming CR/LF 
  230.   pairs, which is why you do not see this problem there. 
  231.  
  232. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  233.  
  234. 11* My RAM card was plugged into the calculator when I changed the RAM 
  235.   card battery, yet I lost all the information on the card.  What 
  236.   happened? 
  237.  
  238.   You forgot to turn ON the calculator before changing the battery.  The 
  239.   HP-48SX only supplies power to the RAM card while the HP-48SX is turned on. 
  240.   While the calculator is turned off, no power is supplied by the calculator, 
  241.   and all power comes from the RAM card battery.  If you then take out the 
  242.   battery from the RAM card while the calculator is turned OFF, the RAM card 
  243.   has no source of power, and you will lose all of the contents in the RAM 
  244.   card. 
  245.  
  246. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  247.  
  248. 12* Why do I get an "Invalid card data" error when I merge a RAM card? 
  249.  
  250.   This message is usually seen when you plug a brand-new RAM card into an 
  251.   HP-48SX.  In this case, this message is normal and is harmless.  It just 
  252.   means that there was no (valid) data on the card. 
  253.  
  254.   If you see this message under any other conditions, it could be one of the 
  255.   following: 
  256.  
  257.      1. You took the battery out of the RAM card while the card was out 
  258.         of the calculator. 
  259.  
  260.      2. You took the battery out of the RAM card while the card was in 
  261.         the calculator *BUT* the calculator was turned off. 
  262.  
  263.      3. The RAM card battery is dead. 
  264.  
  265.      4. There is a problem with either the calculator, the RAM card, or 
  266.         both. 
  267.  
  268. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  269.  
  270. 13* My HP-48SX seems to take longer to turn on and off.  What's going on? 
  271.  
  272.   The usual causes for this are RAM/ROM cards and libraries.  When you turn the 
  273.   calculator on, it checks RAM (the more you have, the longer it takes), and 
  274.   checks to see if any libraries need initializing. 
  275.  
  276.   Also, having a lot of alarms can supposedly also cause this.   
  277.  
  278. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  279.  
  280. 14* I can't account for some of the RAM in the HP-48SX (I can't tell where 
  281.   it's being used).  What's going on? 
  282.  
  283.   It can be any one of a number of things: 
  284.  
  285.  
  286. --------------------------------------------------------------------------- 
  287.   Enabling the use of LAST STACK, LAST ARG, LAST CMD, etc., uses up extra RAM, 
  288.   as the calculator has to keep track of the last stack, arguments, command, 
  289.   etc..  This is particularly important with LAST STACK if you have a 
  290.   large/complex stack, as the HP-48SX has to keep enough information around to 
  291.   recreate the stack after each operation.  You can clear out these variables 
  292.   by pressing ON-C (but also note that this will clear out the stack, the 
  293.   graphics PICT, etc.). 
  294.  
  295. --------------------------------------------------------------------------- 
  296.     From billw@hpcvra.CV.HP.COM Fri Mar  1 17:00:00 1991 
  297.     From: billw@hpcvra.CV.HP.COM (William C Wickes) 
  298.     Date: Wed, 1 Aug 1990 19:51:37 GMT 
  299.     Subject: DOERR: An HP48SX memory eater 
  300.     Organization: Hewlett-Packard Co., Corvallis, OR, USA 
  301.     Newsgroups: comp.sys.handhelds 
  302.  
  303.   Here's a candidate for "most obscure way to use up memory on the HP 48SX." 
  304.   When a program executes DOERR with a string argument, the string and hence 
  305.   the program too if the string is embedded in the program are referenced for 
  306.   the sake of the ERRM command.  Thus if you purge the program, the memory used 
  307.   by the program is not reclaimed until the ERRM reference is updated to a new 
  308.   string.  If the string is in a port, you will get the Object In Use error if 
  309.   you try to purge the library or backup object containing the string.   
  310.  
  311.   A system halt prior to a PURGE will not help unless the object is in port 1 
  312.   or port 2 (it will reclaim memory held by a successfully purged but still 
  313.   referenced object).  For port 0 objects, the only way to break the reference 
  314.   is to execute DOERR again with a new string.   
  315.  
  316. --------------------------------------------------------------------------- 
  317.  
  318. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  319.  
  320. 15* How do I get rid of the HYDE library? 
  321.  
  322.   Getting rid of the HYDE library can be fun.  Here's how to do it: 
  323.  
  324.   1. Go the HOME directory. 
  325.  
  326.   2. Press left-shift (orange) LIBRARY.  The calculator is now 
  327.      displaying a menu of libraries attached to the HOME directory. 
  328.  
  329.   3. Press the menu key that says "STRA".  You are now accessing the 
  330.      HYDE library. 
  331.  
  332.   4. Press the menu key that says "JEKY".  You have now disabled the 
  333.      HYDE library and restored the old (standard) set of messages. 
  334.  
  335.   5. Make sure that a pointer to the library is not on the stack.  The 
  336.      easiest way to do this is to clear the stack using CLR. 
  337.  
  338.   6. Detach the library using: 
  339.  
  340.        :0:998 DETACH 
  341.  
  342.   7. Purge the library using: 
  343.  
  344.        :0:998 PURGE 
  345.  
  346.      When you execute the PURGE, the screen will "jump"/"be messed up" 
  347.      for a brief moment.  Don't worry about it -- it doesn't hurt. 
  348.  
  349. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  350.  
  351. 16* How can I transfer programs/data from my HP-28S to my HP-48SX? 
  352.  
  353.   You use a program called "INPRT", which is available from various archives, 
  354.   and is also included in the IBM-version of the HP-48SX serial cable kit and 
  355.   in the Program Development Library. 
  356.  
  357.   INPRT sends a program to the I/R output of the HP-28S, and the HP-48SX 
  358.   receives it via its I/R input. 
  359.  
  360. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  361.  
  362. 17* I could speed up my HP-28S.  How can I speed up my HP-48SX? 
  363.  
  364.   You can't.  Unlike the HP-28S, the clock speed in the HP-48SX is hardwired to 
  365.   2 MHz. 
  366.  
  367. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  368.  
  369. 18* Why does the HP-48SX display flicker slightly? 
  370.  
  371.   Display flicker is usually caused by fluorescent lights (the rapid pulsing of 
  372.   the fluorescent lights, which is normally unnoticeable, interacts with the 
  373.   rapid pulsing/scanning of the HP-48SX LCD display, which is also normally 
  374.   unnoticeable).  It's normal and harmless. 
  375.  
  376. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  377.  
  378. 19* I've heard that other manufacturer's RAM cards will work with the 
  379.   HP-48SX.  Is this true?  Will it work? 
  380.  
  381.   While some cards may work, there is a chance that you may severely damage 
  382.   your HP-48SX. 
  383.  
  384.   For more information, see Appendix B, "Using non-HP RAM cards in your 
  385.   HP-48SX", near the end of this file. 
  386.  
  387. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  388.  
  389. 20* What library ID numbers have already been used? 
  390.  
  391.          766    -- HP EPSPRINT.LIB library 
  392.          767    -- HP PCLPRINT.LIB library 
  393.          768    -- HP Stopwatch library 
  394.          777    -- "TenK" library 
  395.          998    -- "HYDE" library 
  396.         1092    -- MLDL library (Jan Brittenson -- bson@erice.ai.mit.edu) 
  397.                    (In development -- not officially released) 
  398.         1644    -- SWING ("VMS" graphical directory browser) 
  399.         1791    -- TOOLs library 
  400.         1793    -- New IFERR library 
  401.  
  402. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  403.  
  404. 21* What do the funny symbols \->, \GS+, etc., mean? 
  405.  
  406.   These are the ASCII representation of the special HP-48SX graphical 
  407.   characters.  See the section "Character Translations" in Chapter 33 (Volume 
  408.   II) of the manual for a table of symbols <--> ASCII representations.   
  409.  
  410. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  411.  
  412. 22* What tricks are there for manipulating matrices? 
  413.  
  414.   You can build up a matrix by rows using \GS+ 
  415.  
  416.   You can take a matrix apart by rows using \GS- 
  417.  
  418. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  419.  
  420. 23* How do I store fields of variable length string data in a compact, 
  421.   rapidly accessible manner that does not require the overhead of 
  422.   storing strings in lists? 
  423.  
  424.   See Appendix C, "Compact Data Storage", near the end of this file. 
  425.  
  426. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  427.  
  428. 24* What is "Vectored Enter", and how do I use it? 
  429.  
  430.   From billw@hpcvra.CV.HP.COM Fri Mar  1 17:00:00 1991 
  431.   From: billw@hpcvra.CV.HP.COM (William C Wickes) 
  432.   Date: Mon, 12 Mar 1990 21:21:55 GMT 
  433.   Subject: HP-48SX Vectored Enter 
  434.   Organization: Hewlett-Packard Co., Corvallis, OR, USA 
  435.   Newsgroups: comp.sys.handhelds 
  436.  
  437.   The HP-48SX manuals do not document a very powerful feature that we call 
  438.   "Vectored ENTER," that allows you in effect to redefine or bypass the 
  439.   command line parser and to have a shot at the stack etc. after the command 
  440.   line has been executed. 
  441.  
  442.   Keys that execute an automatic ENTER perform a two-step process: 
  443.  
  444.   1.  The command line is parsed and evaluated. 
  445.   2.  The key definition is executed. 
  446.  
  447.   When flags -62 and -63 are both set, the system extends this process as 
  448.   follows: 
  449.  
  450.   1.  The current path is searched for a global variable named *aENTER (here 
  451.   "*a" is the Greek alpha character--character 140).  If present, the command 
  452.   line is entered as a string object and *aENTER is executed.  If absent, the 
  453.   command line is parsed and evaluated normally. 
  454.  
  455.   2.  The key definition is executed. 
  456.  
  457.   3.  The current path is searched for a global variable named *bENTER ("*b" is 
  458.   Greek beta--character 223).  If present, then a string representing the key 
  459.   definition is put on the stack, and *bENTER is executed.  The string is the 
  460.   key definition object's name if it is a command, XLIB name, global or local 
  461.   name, or an empty string for other object types; its primary purpose is to 
  462.   implement things like the TRACE mode on other calcs, where you can print a 
  463.   running record of what you do. 
  464.  
  465.   A simple example of the use of *aENTER is to create a more convenient binary 
  466.   calculator, where *aENTER slaps a "#" on the front of the command line so you 
  467.   don't have to bother when entering numbers. 
  468.  
  469. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  470.  
  471. 25* How can I tell, from within a program, if the battery is low? 
  472.  
  473.   Preston Brown (prestonb@hpcvra.CV.HP.COM) posted the following: 
  474.  
  475.   The following 48SX program reports the status of the ALERT annunciator. 
  476.   The ALERT annunciator is activated by alarms or low battery. 
  477.  
  478.   This program is provided free of charge "as is" and has no warranty.  No one 
  479.   is liable for any consequential damages. 
  480.  
  481.   Preston 
  482.  
  483. %%HP:T(3)A(D)F(.); 
  484. \<< 
  485. RCLF 
  486. 8 STWS #FFh #0h + 
  487. #10Bh 
  488. #6595Ah SYSEVAL 
  489. #8h AND #0h > 
  490. SWAP STOF 
  491. \>> 
  492.  
  493. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  494.  
  495. 26* I've heard the names "RPL", "Saturn", "STAR", "Voyager", etc..  What 
  496.   do they mean? 
  497.  
  498.     ASAP 
  499.         This is a simple Saturn assembler, written in the perl language (and is 
  500.         therefore usable mostly on Unix machines). 
  501.  
  502.     Chip8 
  503.         This is a machine-code program that was inspired by the chip8 video 
  504.         game interpreter for the CDP1802 microprocessor several years back. 
  505.         Chip8 allows you to write a simple graphics-based video game for the 
  506.         HP-48SX.  Among the games written are "clones" of breakout, pacman, and 
  507.         pong, to name a few (about half?). 
  508.  
  509.     HYDE 
  510.         This is the "HYDE" library, whose only purpose is to change the error 
  511.         messages in the HP-48SX to make it "user unfriendly". 
  512.  
  513.     ML 
  514.         Machine Language.  This is usually used in reference to HP-48SX 
  515.         assembly language programming.   
  516.  
  517.     MLDL 
  518.         Machine Language Development Library.  This is a library, which is 
  519.         still under development, that allows you to debug machine language 
  520.         programs with only an HP-48SX.   
  521.  
  522.     PDL 
  523.         "Program Development Link".  This is an MSDOS program, sold by 
  524.         Hewlett-Packard, that allows you to write and develop HP-48SX 
  525.         applications from your IBM PC clone.  Programs are written on your PC, 
  526.         transferred to the HP-48SX, and tested from your *PC* (and *not* the 
  527.         HP-48SX). 
  528.  
  529.     RPL 
  530.         RPL is the name of the language used to program the HP-48SX and HP-28 
  531.         series calculators.  While many people consider RPL to stand for 
  532.         "Reverse Polish Lisp", an HP Journal article described RPL as 
  533.         "ROM-based Procedural Language".  To muddy the waters, it's also 
  534.         interesting to note that the HP-48SX development team considers RPL to 
  535.         mean "Reverse Polish Lisp", and not what was mentioned in the HP 
  536.         Journal.  [Note: See RPL.TXT on this disk.  -jkh-] 
  537.  
  538.     SASS 
  539.         SASS is a simple Saturn assembler, written in C/yacc (BSD Unix & 
  540.         Bison).  It uses Alonzo Gariepy's mnemonics. 
  541.  
  542.     Saturn 
  543.         "Saturn" is the internal code name for the processor used in the 
  544.         HP-48SX, HP-28 series, and the HP-75/71B calculators. 
  545.  
  546.     STAR 
  547.         This is the "Saturn Macro Assembler" (how "STAR" comes from this, I 
  548.         don't know), an assembler that mostly uses Alonzo Gariepy's mnemonics. 
  549.         It's written in C and runs on many different machines (PCs, Amigas, 
  550.         Unices, etc.).  STAR is available via anonymous ftp from ftp.ai.mit.edu 
  551.         in "/pub/star-1.04.4.tar.Z".  It's also available from various bulletin 
  552.         boards (the HP forum in CompuServe also has a copy).  The latest 
  553.         version is "1.04.4". 
  554.  
  555.     SWING 
  556.         SWING is a library program that displays a graphical tree structure of 
  557.         the directory hierarchy in your HP-48SX, and allows you to move from 
  558.         directory to directory using the arrow keys (it is supposedly based 
  559.         upon an old PD VMS utility). 
  560.  
  561.     Voyager 
  562.         Voyager is an "interactive disassembler" for IBM PC clones that 
  563.         disassembles HP-48SX RPL and machine code.  You download a copy of the 
  564.         RAM *and* ROM in your HP-48SX to your PC, and run Voyager.  Using 
  565.         Voyager, you can then view the disassembled or unthreaded code. 
  566.         Unfortunately (or fortunately), Voyager uses the HP mnemonics, and not 
  567.         Alonzo Gariepy's mnemonics.  Voyager is available from the HP BBS (I 
  568.         think), via anonymous ftp from the HP BBS (hpcvbbs.cv.hp.com), and from 
  569.         various bulletin boards (the HP forum in CompuServe also has a copy). 
  570.         The latest version is "1.07". 
  571.  
  572. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  573.  
  574. 27* Appendix A: ASC\-> and \->ASC functions: 
  575.  
  576. From billw@hpcvra.CV.HP.COM Fri Mar  1 17:00:00 1991 
  577. From: billw@hpcvra.CV.HP.COM (William C Wickes) 
  578. Date: Fri, 17 Aug 1990 22:27:42 GMT 
  579. Subject: HP 48 Object Encoding 
  580. Organization: Hewlett-Packard Co., Corvallis, OR, USA 
  581.  
  582.  
  583.                       ASCII Encoding HP 48SX Objects 
  584.  
  585. Sending an HP 48SX object via electronic mail can be difficult if the object 
  586. does not have an ASCII form, such as is the case for library objects.  There 
  587. are various encoding schemes available on different computer systems, but these 
  588. require that the sender and receiver have similar computers, or at least 
  589. compatible encode/decode schemes.  The programs listed below perform the 
  590. encoding and decoding on the HP 48SX itself, which has the advantage of being 
  591. completely independent of any computer. 
  592.  
  593. The programs are nominally called \->ASC and ASC\->.  The former takes an 
  594. object from the stack and converts it to a string, in which each nibble of the 
  595. object and its checksum is converted to a character 0-9 or A-F.  (The object 
  596. must be in RAM, otherwise a "ROM Object" error is returned.) For sake of easy 
  597. inclusion in email letters, the string is broken up by linefeed characters 
  598. after every 64 characters. 
  599.  
  600. ASC\-> is the inverse of \->ASC: it takes a string created by \->ASC and 
  601. converts it back into an object.  When you transmit the encoded strings, be 
  602. sure not to change the string; ASC\-> uses the checksum encoded in the string 
  603. to verify that the decoding is correct.  An "Invalid String" error is returned 
  604. if the result object does not match the original object encoded by \->ASC. 
  605. When you upload a string to your computer, use HP 48 translate mode 3 so that 
  606. the HP 48 will convert any CR/LF's back to LF's when the string is later 
  607. downloaded. 
  608.  
  609. Two versions of ASC\-> are included here.  The first (P1) is in HP 48 user 
  610. language, using SYSEVALs to execute system objects.  P2 is a string that the 
  611. setup program uses P1 to decode into an executable ASC\->--then P1 is 
  612. discarded.  The second version is more compact than the first, and also 
  613. uneditable and therefore safer (but it can't be transmitted in ASCII form, 
  614. which helps to make the point of this exercise). 
  615.  
  616. Here are the programs, contained in a directory: 
  617.  
  618. (start) 
  619. %%HP: T(3)A(D)F(.); 
  620. DIR 
  621. P1              @ ASC\-> Version 1. 
  622. \<< 
  623.   IF DUP TYPE 2 \=/ 
  624.   THEN "Not A String" DOERR 
  625.   END RCWS \-> ws 
  626.   \<< 16 STWS 
  627.     #0 NEWOB SWAP DUP SIZE 
  628.     IF DUP 4 < 
  629.     THEN DROP SWAP DROP "Invalid String" DOERR 
  630.     END 
  631.     DUP 65 / IP - 4 - # 18CEAh SYSEVAL 
  632.     "" OVER # 61C1Ch SYSEVAL 
  633.     SWAP # 6641F8000AF02DCCh 
  634.     # 130480679BF8CC0h # 518Ah SYSEVAL 
  635.     # 19610313418D7EA4h # 518Ah SYSEVAL 
  636.     # 7134147114103123h # 518Ah SYSEVAL 
  637.     # 5F6A971131607414h # 518Ah SYSEVAL 
  638.     # 12EA1717EA3F130Ch # 518Ah SYSEVAL 
  639.     # 280826B3012808F4h # 518Ah SYSEVAL 
  640.     # 6B7028080BEE9091h # 518Ah SYSEVAL 
  641.     # BE5DC1710610C512h # 518Ah SYSEVAL 
  642.     # 705D00003431A078h # 518Ah SYSEVAL 
  643.     # 3D8FA26058961431h # 518Ah SYSEVAL 
  644.     # 312B0514h # 518Ah SYSEVAL 
  645.     # 18F23h SYSEVAL 
  646.     DUP BYTES DROP 4 ROLL 
  647.     IF == 
  648.     THEN SWAP DROP 
  649.     ELSE DROP "Invalid String" DOERR 
  650.     END ws STWS 
  651.   \>> 
  652. \>> 
  653.  
  654. P2      @ ASC\->  Version 2.  To be converted by ASC\-> version 1. 
  655.  
  656. "D9D20D29512BF81D0040D9D20E4A209000000007566074726636508813011920 
  657. 140007FE30B9F060ED3071040CA1304EC3039916D9D2085230B9F06C2A201200 
  658. 094E66716C696460235472796E676933A1B21300ED30FD5502C230C1C1632230 
  659. CCD20FA0008F14660CC8FB97608403104AE7D814313016913213014117414317 
  660. 414706131179A6F5C031F3AE7171AE214F8082103B6280821909EEB0808207B6 
  661. 215C0160171CD5EB870A13430000D50713416985062AF8D341508813044950B9 
  662. F06BBF06EFC36B9F0644230C2A201200094E66716C696460235472796E676933 
  663. A1B2130B21300373" 
  664.  
  665.  
  666. P3      @\->ASC.     To be converted by ASC\->. 
  667. "D9D20D2951881304495032230FD5502C230A752688130ADB467FE30322306AC3 
  668. 0CB916E0E30CBD30F6E30C1C1632230CCD20DC0008F14660CC8FB97608403104 
  669. AE7D8143130169174147061741431311534AC6B4415141534946908D9B026155 
  670. 4A6F53131F3AE731A014C161AE215F08082103A6280821939EEC08082170A621 
  671. 4C161170CD56B870A18503430000D5071351796A9F8D2D02639916D9D2085230 
  672. C2A209100025F4D402F426A6563647933A1B2130A2116B213033C0" 
  673.  
  674. SETUP   @Automatic setup program 
  675. \<< P2 P1 'ASC\->' STO 
  676.     P3 ASC\-> '\->ASC' STO 
  677.     { P1 P2 P3 SETUP } PURGE 
  678. \>> 
  679.  
  680. END 
  681. (end) 
  682.  
  683.  
  684. Installation instructions: 
  685.  
  686. 1.  Edit the above text between (start) and (end) into a text file named CONV 
  687.     (for example).  Be sure that you leave the strings exactly as entered 
  688.     above, with no extra spaces or other invisible characters at the beginnings 
  689.     or ends of the lines. 
  690. 2.  Set the HP 48SX into ASCII transfer mode. 
  691. 3.  Using Kermit, download CONV text file to the 48, verify its checksum 
  692.     (6C8Ah). 
  693. 4.  Execute CONV to make it the current directory. 
  694. 5.  Execute SETUP. 
  695. 6.  The directory CONV now contains ASC\-> and \->ASC, ready to use. 
  696.  
  697. To archive the decoded versions of ASC\-> and \->ASC back on your computer, 
  698. be sure to set the HP 48SX in binary transfer mode before uploading. 
  699.  
  700. Disclaimers: 
  701.  
  702. + Use the programs at your own risk.  Any time you delve into the SYSEVAL 
  703. world, there are increased dangers.  Archive your 48 memory before 
  704. experimenting with these programs!  Also, verify the checksums of objects 
  705. defined above to make sure they have been downloaded correctly, before 
  706. executing ASC\->. 
  707.  
  708. + I will not answer questions about how the programs work.  This is not because 
  709. of any great secrecy, but rather because it's hard to give any answer that 
  710. doesn't lead to more questions, and more, and more... 
  711.  
  712. + 48 hackers are welcome to mine any nuggets they can from the programs, and 
  713. from the fact that \->ASC is a convenient way to decompile an object. 
  714.  
  715. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  716.  
  717. 28* Appendix B: Using non-HP RAM cards in your HP-48SX: 
  718.  
  719.   If you use RAM cards that are NOT designed for the HP-48SX, it is possible to 
  720.   severely damage your HP-48SX.  If you want to be safe, you should only use 
  721.   RAM cards designed for the HP-48SX. 
  722.  
  723.   Here is an edited discussion from comp.sys.handhelds. 
  724.  
  725.   From steveh@hpcvra.CV.HP.COM Fri Mar  1 17:00:00 1991 
  726.   From: steveh@hpcvra.CV.HP.COM (Steve Harper) 
  727.   Date: Thu, 10 May 1990 22:46:09 GMT 
  728.   Subject: RE: HP48SX Memory Card Pricing 
  729.   Organization: Hewlett-Packard Co., Corvallis, OR, USA 
  730.  
  731.   There has been a substantial amount of comment regarding the memory cards for 
  732.   the HP48SX and their prices.  My purpose in this response is not to attempt 
  733.   to justify any particular price, but rather to present the technical reasons 
  734.   why there is a substantial price difference between the memory cards and 
  735.   other types of expansion memory for PC's, for example, with which users are 
  736.   probably more familiar. 
  737.  
  738.   Some users have correctly pointed out that the memory in the cards is static 
  739.   RAM rather than dynamic RAM commonly used in PC's.  Dynamic RAM uses one 
  740.   transistor and a capacitor for each bit of memory whereas static RAM requires 
  741.   either four transistors and two resistors, or six transistors.  The net 
  742.   result is that an equivalent amount of static RAM is much larger and 
  743.   therefore much more expensive than dynamic RAM.  The advantage is that static 
  744.   RAM doesn't need to continually be running and drawing current (refresh 
  745.   cycles) to retain the contents of memory. 
  746.  
  747.   In addition, the static memory used in the cards is not just any static 
  748.   memory, but is specially processed and/or selected for very low standby 
  749.   current.  This allows the backup battery in the card to keep memory alive for 
  750.   a very long time, rather than requiring the user to replace it every few 
  751.   months.  The special processing and/or special testing to select low current 
  752.   parts adds to the already higher cost of the static RAM chips. 
  753.  
  754.   The standard molded plastic DIP package used for most integrated circuits, 
  755.   including memory chips, is relatively inexpensive because of its simplicity 
  756.   and the huge volumes.  Unfortunately, these packages are too large to put 
  757.   into a memory card.  Therefore, the card manufacturer mounts the individual 
  758.   silicon memory chips directly on a special thin PC board together with the 
  759.   memory support chips.  Because multiple chips are being placed in a single 
  760.   hybrid package in a special process which has lower volume, yields are lower 
  761.   and this again causes the cost to be higher.  Indeed, the yield becomes 
  762.   exponentially worse as the number of chips and interconnections increases in 
  763.   such a packaging process. 
  764.  
  765.   In addition to the memory chips themselves, two more integrated circuits and 
  766.   several discrete components are required for power and logic control.  A 
  767.   bipolar technology chip senses the external voltage and switches the power to 
  768.   the chips from the internal keep-alive battery as needed.  A CMOS gate array 
  769.   chip protects the memory address and data lines from glitches/ESD when the 
  770.   card is not plugged in.  This chip also generates the proper enabling signals 
  771.   when there are multiple memory chips in the card, as is presently the case 
  772.   with the 128 Kbyte RAM card.  These chips must be designed for extremely low 
  773.   current, just as the memory chips are. 
  774.  
  775.   In addition to the battery and the battery holder, the other mechanical parts 
  776.   are important, too.  The molded plastic frame holds the PC board and provides 
  777.   the foundation for the metal overlays and the shutter-and-springs assembly 
  778.   which protects the contacts from ESD and from contaminants.  The 
  779.   write-protect switch is also an important feature.  It is quite expensive for 
  780.   the manufacturer to make the tools necessary to fabricate each of these parts 
  781.   as well as the tools to assemble and test the complete card.  While the 
  782.   volume of memory cards is relatively low this tooling cost represents a 
  783.   significant part of the cost of each card. 
  784.  
  785.   Admittedly, there are other alternatives, such as those presently used in 
  786.   PC's, to provide a memory expansion capability.  To provide that kind of 
  787.   expansion would require the calculator to be much larger than it is and 
  788.   possibly more expensive.  This is clearly very undesirable. 
  789.  
  790.   Other features that were felt to be essential were the ability to distribute 
  791.   software applications and to share and archive/backup user-created programs 
  792.   and data.  Other expansion alternatives do not provide these important 
  793.   benefits.  The IO capabilities of the calculator provide these features only 
  794.   to a limited degree.   
  795.  
  796.   One other item bears repeating here: Memory cards for use in the calculator 
  797.   will clearly indicate that they are for use with the HP48SX.  Other memory 
  798.   cards exist which are mechanically compatible with the HP48S, but these cards 
  799.   cannot be relied upon to work electrically in the calculator.  The HP48SX 
  800.   cards are designed for a lower supply voltage range.  Use of the other cards 
  801.   may cause memory loss, and under certain circumstances may even damage your 
  802.   calculator electrically. 
  803.  
  804.   From steveh@hpcvra.CV.HP.COM Fri Mar  1 17:00:00 1991 
  805.   From: steveh@hpcvra.CV.HP.COM (Steve Harper) 
  806.   Date: Fri, 11 May 1990 16:52:07 GMT 
  807.   Subject: Re: Memory Card: Give Us *True* Facts! 
  808.   Organization: Hewlett-Packard Co., Corvallis, OR, USA 
  809.  
  810.   My previous statement that under certain circumstances the calculator may 
  811.   even be damaged electrically is not a ploy.  If the calculator's internal 
  812.   power supply voltage happens to be near the low end of the range, say 4.1 V, 
  813.   and the voltage at which the card's voltage control chip shuts it down 
  814.   happens to be near the high end of its range, say 4.2 V (this can and does 
  815.   occasionally occur for the non-HP48SX cards), then the calculator will start 
  816.   to drive the memory address lines and the card will still have these clamped 
  817.   to ground (that's what it does to protect itself when there is not sufficient 
  818.   system voltage to run).  This unfortunate situation may simply trash your 
  819.   memory, or if the calculator tries to drive enough of the lines high at the 
  820.   same time, several hundred milliamps may flow...for awhile that is, until 
  821.   something gives up...  On the other hand, your calculator and a particular 
  822.   non-HP48SX card may work just fine if those voltages happen to be at the 
  823.   other end of their ranges.  These voltages are also slightly temperature 
  824.   sensitive.  It may work in the classroom or office and not at the beach, or 
  825.   vice versa.  The voltage trip point of the HP48SX cards has been set lower (a 
  826.   different voltage control chip) so that this cannot occur, regardless of part 
  827.   and temperature variations. 
  828.  
  829.   One other item was brought to my attention yesterday by Preston Brown that I 
  830.   should have included in my original posting here.  While most of us recognize 
  831.   that comparing ram cards to a handful of dynamic ram chips to plug into your 
  832.   PC is apples and oranges, it may be more interesting to compare the HP48SX 
  833.   cards with cards for other products, like the Atari Portfolio, the Poquet, 
  834.   the NEC Ultralite, etc.  I believe you will find that the prices on the 
  835.   HP48SX cards are not at all out of line. 
  836.  
  837.   Steve 
  838.   "I claim all disclaimers..." 
  839.  
  840.   the non-HP48SX cards 
  841.  
  842.   From prestonb@hpcvra.CV.HP.COM Fri Mar  1 17:00:00 1991 
  843.   From: prestonb@hpcvra.CV.HP.COM (Preston Brown) 
  844.   Date: Thu, 17 May 1990 17:26:53 GMT 
  845.   Subject: Re: Memory Card: Give Us *True* Facts! 
  846.   Organization: Hewlett-Packard Co., Corvallis, OR, USA 
  847.  
  848.   When the RAM cards detect that voltage is too low to operate they clamp the 
  849.   address lines to ground.  This clamping is done by turning on the output 
  850.   drivers of a custom chip included on the card.  The clamping current is 
  851.   speced at 2mA min at the Vol output level.  Since the 48 can be trying to 
  852.   drive the line all the way high even more current is typical.  10mA per fight 
  853.   is not uncommon with totals of several hundred mAs. 
  854.  
  855.   The VDD power supply is regulated at 4.1 - 4.9 with typical parts at the low 
  856.   end (4.3).  The power to the cards is switched thru a transistor, creating up 
  857.   to a 0.1V drop.  Standard Epson cards have a significant chance of seeing 
  858.   this voltage as to low and shutting down.  We have seen cards do this in the 
  859.   lab.  When it occurs the calculator locks up with VDD pulled down to about 
  860.   2.5V and 250mA being drawn from the batteries.  This current drain greatly 
  861.   exceeds the ratings for the power supply and can damage your calc.  The least 
  862.   that will happen is a loss of memory. 
  863.  
  864.   Now, why didn't we regulate VDD higher?  The 48 has two power supplies VDD at 
  865.   4.3 and VH at 8.5.  VH cannot be regulated higher without exceeding the spec 
  866.   for our CMOS IC process.  VH is used as the + voltage for the I/O.  In order 
  867.   to meet a +3V output level VH must be more then 3.6V above VDD.  (VDD is used 
  868.   as I/O ground).  Our power supply system increase the battery life and 
  869.   reduces the cost greatly for the wired I/O. 
  870.  
  871.   Preston 
  872.  
  873. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  874.  
  875. 29* Appendix C: Compact Data Storage: 
  876.  
  877.   From Jim Donnelly (jimd@cv.hp.com): 
  878.  
  879.   A simple length-encoding technique can be put to use for a free-format, very 
  880.   compact multi-field data storage system.  Two tiny programs, SUBNUM and 
  881.   STRCON are here to help the process, and are listed near the end of this 
  882.   note.  At the end of the note is a directory that may be downloaded into the 
  883.   HP 48 that contains the examples. 
  884.  
  885.   The principle is to store starting indices in the beginning of a string that 
  886.   point to fields stored subsequently in the string.  The indices are stored in 
  887.   field order, with an additional index at the end to accommodate the last 
  888.   field.  There are several small points worth mentioning: 
  889.  
  890.   1) Fields may be 0-length using this technique. 
  891.   2) The execution time is uniform across all fields. 
  892.   3) This technique saves about 4 bytes per field after the first field, 
  893.      because the string prolog and length are omitted for fields 2 -> n. 
  894.  
  895.  
  896.         EXAMPLE: 
  897.         -------- 
  898.  
  899.                          Indices  |          Fields 
  900.           Character               |     1 11111111 12222222222 
  901.           Position :   1  2  3  4 |567890 12345678 90123456789 
  902.                       +--+--+--+--+------+--------+-----------+ 
  903.           String :    | 5|11|19|30|Field1| Field2 |  Field 3  | 
  904.                       +--+--+--+--+------+--------+-----------+ 
  905.  
  906.   This is a string that contains 3 fields, and therefore 4 index entries.  The 
  907.   first field begins at character 5, the second field begins at character 11, 
  908.   and the third field begins at character 19.  To keep the pattern consistent, 
  909.   notice that the index for field 4 is 30, which is one more than the length of 
  910.   the 29 character data string. 
  911.  
  912.   To extract the second field, place the string on the stack, use SUBNUM on 
  913.   character 2 to extract the starting position, use SUBNUM on character 3 to 
  914.   extract the (ending position +1), subtract 1 from the (ending position+1), 
  915.   then do a SUB to get the field data.  NOTE: The index for field 1 is stored 
  916.   as character code 5, NOT "5"!  To place the field index for field 1 in the 
  917.   string, you would execute "data" 1 5 CHR REPL. 
  918.  
  919.  
  920.         PROGRAM: 
  921.         -------- 
  922.  
  923.   The following program accepts an encoded data string in level 2 and a field 
  924.   number in level 1: 
  925.  
  926.         DECODE   "data"  field#  -->  "field" 
  927.  
  928.         <<  --> f 
  929.           << 
  930.             DUP f SUBNUM                ; "data" start --> 
  931.             OVER f 1 + SUBNUM           ; "data" start end+1 --> 
  932.             1 -                         ; "data" start end --> 
  933.             SUB                         ; "field" --> 
  934.           >> 
  935.         >> 
  936.  
  937.  
  938.         DATA ENCODING 
  939.         ------------- 
  940.  
  941.   The following program expects a series of 'n' strings on the stack and 
  942.   encodes them into a data string suitable for reading by the first example 
  943.   above. 
  944.  
  945.   The programs SUBNUM and STRCON are used to assemble the indices. 
  946.  
  947.         ENCODE      field n  ...  field 1   n   -->  "data" 
  948.  
  949.         << DUP 2 + DUP 1 - STRCON --> n  data 
  950.           << 
  951.             1 n 
  952.             FOR i 
  953.               data i SUBNUM OVER SIZE   ; ... field index fieldsize 
  954.               + data SWAP               ; ... field "data" index' 
  955.               i 1 + i + SWAP CHR REPL   ; ... field "data"' 
  956.               SWAP + 'data' STO         ; ... 
  957.             NEXT 
  958.             data                        ; "data" 
  959.           >> 
  960.         >> 
  961.  
  962.   In this example, four strings are encoded: 
  963.  
  964.         Input:  5: "String" 
  965.                 4: "Str" 
  966.                 3: "STR" 
  967.                 2: "STRING" 
  968.                 1:         4 
  969.  
  970.         Output: "xxxxxSTRINGSTRStrString"      (23 character string) 
  971.         (The first five characters have codes 6, 12, 15, 18, and 24) 
  972.  
  973.  
  974.  
  975.         VARIATION: 
  976.         ---------- 
  977.  
  978.   The technique above has a practical limit of storing up to 254 characters of 
  979.   data in a string.  To overcome this, just allocate two bytes for each field 
  980.   position.  The code to extract the starting index for becomes a little more 
  981.   busy.  In this case, the index is stored as two characters in hex. 
  982.  
  983.                       Indices  |          Fields 
  984.        Character               | 11111 11111222 22222223333 
  985.        Position :   12 34 56 78|901234 56789012 34567890123 
  986.                    +--+--+--+--+------+--------+-----------+ 
  987.        String :    |09|0F|17|21|Field1| Field2 |  Field 3  | 
  988.                    +--+--+--+--+------+--------+-----------+ 
  989.  
  990.            <<  --> f 
  991.              << 
  992.                 DUP f 2 * 1 -           ; "data" "data" indx1 --> 
  993.                 SUBNUM 16 *             ; "data" 16*start_left_byte  --> 
  994.                 OVER f 2 * SUBNUM +     ; "data" start 
  995.                 OVER f 2 * 1 + SUBNUM   ; "data" start end_left_byte --> 
  996.                 16 * 3PICK f 1 + 2 * 
  997.                 SUBNUM + 1 -            ; "data" start end --> 
  998.                 SUB                     ; "field"  --> 
  999.              >> 
  1000.            >> 
  1001.  
  1002.  
  1003.  
  1004.         TWO VERY TINY HELPFUL PROGRAMS 
  1005.         ------------------------------ 
  1006.  
  1007.         SUBNUM          "string"  position  -->  code 
  1008.  
  1009.         << DUP SUB NUM >> 
  1010.  
  1011.  
  1012.  
  1013.         STRCON          code  count  -->  "repeated string" 
  1014.  
  1015.         << -->  code count 
  1016.           << "" code CHR 'code' STO 
  1017.              1 count START code + NEXT 
  1018.           >> 
  1019.         >> 
  1020.  
  1021.  
  1022.         A DIRECTORY YOU CAN DOWNLOAD 
  1023.         ---------------------------- 
  1024.  
  1025.   This is a directory object.  Cut after the === to the end of the file and 
  1026.   download to your HP 48 using the ASCII transfer. 
  1027.  
  1028. ======================================================================== 
  1029. %%HP: T(3)A(D)F(.); 
  1030. DIR 
  1031.   DECODE 
  1032.     \<< \-> f 
  1033.       \<< DUP f 
  1034. SUBNUM OVER f 1 + 
  1035. SUBNUM 1 - SUB 
  1036.       \>> 
  1037.     \>> 
  1038.   ENCODE 
  1039.     \<< DUP 2 + DUP 1 
  1040. - STRCON \-> n data 
  1041.       \<< 1 n 
  1042.         FOR i data 
  1043. i SUBNUM OVER SIZE 
  1044. + data SWAP i 1 + 
  1045. SWAP CHR REPL SWAP 
  1046. + 'data' STO 
  1047.         NEXT data 
  1048.       \>> 
  1049.     \>> 
  1050.   STRCON 
  1051.     \<< \-> code count 
  1052.       \<< "" code CHR 
  1053. 'code' STO 1 count 
  1054.         START code 
  1055.         NEXT 
  1056.       \>> 
  1057.     \>> 
  1058.   SUBNUM 
  1059.     \<< DUP SUB NUM 
  1060.     \>> 
  1061. END 
  1062.  
  1063. bÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄb 
  1064.  
  1065. 30* Appendix D: Various useful functions 
  1066.  
  1067.   (Shamelessly lifted from the HP-41C manual:) 
  1068.  
  1069.   The LASTX function is useful in calculations where a number occurs more than 
  1070.   once.  By recovering a number using LASTX, you do not have to key that number 
  1071.   into the calculator again. 
  1072.  
  1073.   For example, calculate: 
  1074.  
  1075.                 96.704 + 52.394706 
  1076.                -------------------- 
  1077.                      52.394706 
  1078.  
  1079.         Keystrokes:                     X: 
  1080.        ------------------              -------------------- 
  1081.         96.704 ENTER                    96.704 
  1082.         52.304706 +                     149.098706 
  1083.         LASTX                           52.304706 
  1084.         /                               2.84568265351 
  1085.  
  1086. @ This is a version of LASTX for the HP-48SX 
  1087. %%HP: T(3)A(D)F(.); 
  1088. \<< DEPTH \-> n 
  1089.   \<< LASTARG DEPTH n - DUP \-> s 
  1090.     \<< ROLLD s 1 - DROPN 
  1091.     \>> 
  1092.   \>> 
  1093. \>> 
  1094.